package cn.cloud.all.security.oauth2.provider.token.service;

import cn.cloud.all.security.core.AuthenticationException;
import cn.cloud.all.security.oauth2.common.OAuth2AccessToken;
import cn.cloud.all.security.oauth2.provider.OAuth2Authentication;
import cn.cloud.all.security.oauth2.provider.TokenRequest;

public interface AuthorizationServerTokenServices {

    OAuth2AccessToken createAccessToken(OAuth2Authentication authentication) throws AuthenticationException;

    OAuth2AccessToken refreshAccessToken(String refreshToken, TokenRequest tokenRequest) throws AuthenticationException;

    OAuth2AccessToken getAccessToken(OAuth2Authentication authentication);
}